<template>
  <div>
    <h3>Test组件</h3>
    <p ref="abc">这是Tes组件中的p标签</p>
    <button @click="shou">获取p的innerHTML</button>
  </div>
</template>

<script>
export default {
  methods :{
    getP () {
      const p =this.$refs.abc
      console.log(p);
    },
    shou() {
      const p =this.$refs.abc
      console.log(p.innerHTML);
    }
  }
}
</script>

<style>

</style>